﻿<%@ Page Title="Search Residents" Language="C#" MasterPageFile="~/Resources/AAMMaster.master"
    AutoEventWireup="true" CodeBehind="searchresidents.aspx.cs" Inherits="LMKJ.searchresidents" %>

<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
    <div class="form_name">
        Resident Management
    </div>
    <table>
        <tr>
            <td>
                Search:
            </td>
            <td>
                <asp:TextBox ID="searchTbx" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:DropDownList ID="searchDdl" runat="server">
                    <asp:ListItem Selected="True">NRIC</asp:ListItem>
                    <asp:ListItem>Name</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="searchBtn" Text="Search" runat="server" OnClick="searchBtn_Click"
                    CssClass="buttonSearch" />
                <asp:Button ID="showAllBtn" Text="Show All" runat="server" OnClick="showAllBtn_Click"
                    CssClass="buttonShowAll" />
            </td>
        </tr>
    </table>
    <asp:DataList ID="residentDlist" runat="server" Width="100%">
        <HeaderTemplate>
            <table style="width: 100%">
                <tr>
                    <td>
                        <b>NRIC</b>
                    </td>
                    <td>
                        <b>Name</b>
                    </td>
                    <td>
                        <b>Ethnic Group</b>
                    </td>
                    <td>
                        <b>Description of Disability</b>
                    </td>
                    <td>
                        <b>Manage</b>
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <asp:Label ID="nricLbl" runat="server" Text='<%# Eval("Nric") %>'></asp:Label>
                </td>
                <td>
                    <asp:Label ID="nameLbl" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                </td>
                <td>
                    <asp:Label ID="ethnicityLbl" runat="server" Text='<%# Eval("Ethnicity") %>'></asp:Label>
                </td>
                <td>
                    <asp:Label ID="descriptionLbl" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
                </td>
                <td>
                    <asp:HyperLink ID="detailsHl" runat="server" Text="View Details" NavigateUrl='<%# "viewresidentdetails.aspx?details="+Eval("Nric") %>'></asp:HyperLink>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table></FooterTemplate>
    </asp:DataList>
</asp:Content>
